<% if is_admin? %>
<h2>Admin Actions</h2>
<h3>Add a trait to this character</h3>
<p style="color: red"><%= flash[:error] %></p>
<% remote_form_for [@trait] do |f| -%>
  <input type="hidden" name="character_id" value="<%=@character.id%>"/>
  <p>
  Trait: <select name="trait_id">
  	<%= options_traits %>
  </select>
  </p>
  <%= f.submit 'Add this trait' %>
<% end -%>
<h3>Other</h3>
<table>
	<tr>
		<td><%= link_to 'Kill', @character, :confirm => 'Are you sure?', :method => :delete %></td>
		<td>
			<form action="/court/marry" method="post">
				<input type="hidden" name="character_id" value="<%=@character.id%>"/>
				<select name="spouse_id">
					<%=options_single_characters (@character.opposite_sex) %>
				</select>
				<input type="submit" value="Marry"/>
			</form>
		</td>
	</tr>
</table>
<% end %>
